﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OutstandingActivitiesListing.aspx.cs"
    Inherits="MTRC.ODMS.Web.SOM.AOActivityListing.OutstandingActivitiesListing" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="APJ.Web.UI.WebControls" Namespace="APJ.Web.UI.WebControls"
    TagPrefix="APJ" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Operational Data Management System</title>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <link id="cssWait" rel="stylesheet" type="text/css" />
    <%-- add by gordon 20150812 | For Search Wait Cursor --%>
    <style type="text/css">
        .FastCompalete
        {
            cursor: hand;
        }
        label
        {
            cursor: pointer;
        }
        .style1
        {
            width: 1096px;
        }
    </style>
    <script src="../../jQuery/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script type="text/jscript" language="JavaScript" src="../../Javascript/CommonFunction.js"></script>
    <script src="../../Javascript/SOM/Common.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Javascript/MainMenuScript.js"></script>
    <script type="text/jscript">
        /* Add by Dylan 20150617 for ISSUE U48  */
        // modifidy by dylan 20150730 for issue u133
        //        $(function () {
        //            $("#<%=this.chklShow.ClientID%>_0").click(function () {
        //                if ($(this)[0].checked) {
        //                    $("#<%=this.cbxReturnItemOs.ClientID%>").attr({ disabled: "disabled", checked: "checked" });
        //                } else {
        //                    $("#<%=this.cbxReturnItemOs.ClientID%>").removeAttr("disabled").removeAttr("checked");
        //                }
        //            });
        //        });

        function PageOnload() {
            var isBack = document.getElementById("<%=HiddenFieldIsBack.ClientID %>").value;
            if (isBack == "1") {
                document.getElementById("<%=HiddenFieldIsBack.ClientID %>").value = "";
                document.getElementById("BFSearc").click();
            }
            //            //            if (isBack == "1") {
            //            //            document.getElementById("rdoAnd").disabled = true;
            //            //            document.getElementById("rdoOr").disabled = true;
            //            //document.getElementById("dtbEstimatedCompletion").style.display="none";
            //            var objFreeText = document.getElementById("chkFreeTextSearch");
            //            // ChangeFreeTextSearchStatus(objFreeText)
            //            //var objEstimatedCompletion = document.getElementById("chkEstimatedCompletion");
            //            //ChangeEstimatedCompletion(objEstimatedCompletion)

            //            // edit by jack 20151130 for cookie save
            //            //var station = GetCookie("OutstandingActivitiesListing_station");
            //            var OutstandingActivitiesListing = eval('(' + GetCookie("OutstandingActivitiesListting_Common") + ')');
            //            var station = OutstandingActivitiesListing.Station;
            //            if (station != "" && station != null && isBack == "1") {
            //                /************edit by jack 20151130 for cookie save start***************************/
            //                document.getElementById("ddlStation").value = station;
            //                //SetCookie("OutstandingActivitiesListing_station", "");
            //                //                var dateFrom = GetCookie("OutstandingActivitiesListing_dateFrom");
            //                //                var dateTo = GetCookie("OutstandingActivitiesListing_dateTo");
            //                var dateFrom = OutstandingActivitiesListing.DateFrom;
            //                var dateTo = OutstandingActivitiesListing.DateTo;
            //                var inputAll = document.getElementsByTagName("input");
            //                for (var i = 0; i < inputAll.length; i++) {
            //                    if (inputAll[i].type == "text" && inputAll[i].id.indexOf("dtbFromDate") >= 0) {
            //                        inputAll[i].value = dateFrom;
            //                    }
            //                    if (inputAll[i].type == "text" && inputAll[i].id.indexOf("dtbToDate") >= 0) {
            //                        inputAll[i].value = dateTo;
            //                    }
            //                }


            //                //                var showlist = GetCookie("OutstandingActivitiesListing_showlist");
            //                //                var showlists = showlist.split(",");
            //                //                var lalValue = document.getElementById("chklShow").getElementsByTagName("label");
            //                //                var chkList = document.getElementById("chklShow").getElementsByTagName("input");
            //                //                for (var i = 0; i < chkList.length; i++) {
            //                //                    var chkID = chkList[i].id;
            //                //                    for (var j = 0; j < lalValue.length; j++) {
            //                //                        var forvalue = lalValue[j].getAttributeNode("for").value;
            //                //                        if (chkID == forvalue) {
            //                //                            for (var k = 0; k < showlists.length; k++) {
            //                //                                if (lalValue[j].innerHTML == showlists[k]) {
            //                //                                    chkList[i].checked = true;
            //                //                                }
            //                //                            }
            //                //                        }
            //                //                    }
            //                //                }
            //                //var showValue = GetCookie("OutstandingActivitiesListing_showlist");
            //                var showValue = OutstandingActivitiesListing.List;
            //                setChackboxListValue("chklShow", showValue);

            //                //SetCookie("OutstandingActivitiesListing_showlist", "");

            //                //                var categorylist = GetCookie("OutstandingActivitiesListing_workCategory");
            //                //                var categorylists = categorylist.split(",");
            //                //                var lalValueCategory = document.getElementById("cblWordCategory").getElementsByTagName("label");
            //                //                var chkListCategory = document.getElementById("cblWordCategory").getElementsByTagName("input");
            //                //                for (var i = 0; i < chkListCategory.length; i++) {
            //                //                    var chkID = chkListCategory[i].id;
            //                //                    for (var j = 0; j < lalValueCategory.length; j++) {
            //                //                        var forvalue = lalValueCategory[j].getAttributeNode("for").value;
            //                //                        if (chkID == forvalue) {
            //                //                            for (var k = 0; k < categorylists.length; k++) {
            //                //                                if (lalValueCategory[j].innerHTML == categorylists[k]) {
            //                //                                    chkListCategory[i].checked = true;
            //                //                                }
            //                //                            }
            //                //                        }
            //                //                    }
            //                //                }

            //                //var categorylist = GetCookie("OutstandingActivitiesListing_workCategory");
            //                var categorylist = OutstandingActivitiesListing.WorkCategory
            //                setChackboxListValue("cblWordCategory", categorylist);



            //                //var chkSearch = GetCookie("OutstandingActivitiesListing_chkSearch");
            //                var chkSearch = OutstandingActivitiesListing.chkSearch;
            //                if (chkSearch.toUpperCase() == "TRUE") {
            //                    document.getElementById("chkSearch").checked = true;
            //                } else {
            //                    document.getElementById("chkSearch").checked = false;
            //                }
            //                //var FreeTextSearch = GetCookie("OutstandingActivitiesListing_FreeTextSearch");
            //                var FreeTextSearch = OutstandingActivitiesListing.FreeTextSearch;
            //                if (FreeTextSearch == "1") {
            //                    document.getElementById("chkFreeTextSearch").checked = true;
            //                    //added by Nathan 2015-08-15
            //                    //                    var TxtConditionOne = GetCookie("OutstandingActivitiesListing_TxtConditionOne");
            //                    //                    document.getElementById("TxtConditionOne").value = TxtConditionOne;

            //                    //                    var TxtConditionTwo = GetCookie("OutstandingActivitiesListing_TxtConditionTwo");
            //                    //                    document.getElementById("TxtConditionTwo").value = TxtConditionTwo;

            //                    //                    var TxtConditionThree = GetCookie("OutstandingActivitiesListing_TxtConditionThree");
            //                    //                    document.getElementById("TxtConditionThree").value = TxtConditionThree;

            //                    //                    document.getElementById("TextOne").value = GetCookie("OutstandingActivitiesListing_TxtConditionOne");
            //                    //                    document.getElementById("TextTwo").value = GetCookie("OutstandingActivitiesListing_TxtConditionTwo");
            //                    //                    document.getElementById("TextThree").value = GetCookie("OutstandingActivitiesListing_TxtConditionThree");

            //                    document.getElementById("TextOne").value = OutstandingActivitiesListing.ConditionOne;
            //                    document.getElementById("TextTwo").value = OutstandingActivitiesListing.ConditionTwo;
            //                    document.getElementById("TextThree").value = OutstandingActivitiesListing.ConditionThree;
            //                    //added by Nathan 2015-08-15

            //                    var v = 1;
            //                    //var rdoAnd = GetCookie("OutstandingActivitiesListing_rdoAnd");
            //                    var rdoAnd = OutstandingActivitiesListing.Rand;
            //                    document.getElementById("rdoAnd").checked = rdoAnd;

            //                    //var rdoOr = GetCookie("OutstandingActivitiesListing_rdoOr");
            //                    var rdoOr = OutstandingActivitiesListing.Ror;
            //                    document.getElementById("rdoOr").checked = rdoOr;

            //                    //if (GetCookie("OutstandingActivitiesListing_rdoAnd").toUpperCase() == "TRUE") {
            //                    if (rdoAnd.toUpperCase() == "TRUE") {
            //                        v = 1;
            //                    } else {
            //                        v = 2;
            //                    }
            //                    document.getElementById("TextRadio").value = v;
            //                } else {
            //                    document.getElementById("chkFreeTextSearch").checked = false;
            //                }


            //                //if (GetCookie("OutstandingActivitiesListing_cbxReturnItemOs").toUpperCase() == "TRUE") {
            //                if (OutstandingActivitiesListing.cbxReturnItemOs.toUpperCase() == "TRUE") {
            //                    document.getElementById("cbxReturnItemOs").checked = true;
            //                } else {
            //                    document.getElementById("cbxReturnItemOs").checked = false;
            //                }
            //                //}
            //                //                SetCookie("OutstandingActivitiesListing_dateFrom", "");
            //                //                SetCookie("OutstandingActivitiesListing_dateTo", "");
            //                //                SetCookie("OutstandingActivitiesListing_workCategory", "");
            //                //                SetCookie("OutstandingActivitiesListing_chkSearch", "");

            //                //                SetCookie("OutstandingActivitiesListing_FreeTextSearch", "");
            //                //                SetCookie("OutstandingActivitiesListing_TxtConditionOne", "");
            //                //                SetCookie("OutstandingActivitiesListing_TxtConditionTwo", "");
            //                //                SetCookie("OutstandingActivitiesListing_TxtConditionThree", "");
            //                //                SetCookie("OutstandingActivitiesListing_rdoAnd", "");
            //                //                SetCookie("OutstandingActivitiesListing_rdoOr", "");
            //                SetCookie("OutstandingActivitiesListting_Common", "", -1000);
            //                document.getElementById("BFSearc").click();

            //            } else {
            //                //                SetCookie("OutstandingActivitiesListing_dateFrom", "");
            //                //                SetCookie("OutstandingActivitiesListing_dateTo", "");
            //                //                SetCookie("OutstandingActivitiesListing_workCategory", "");
            //                //                SetCookie("OutstandingActivitiesListing_chkSearch", "");

            //                //                SetCookie("OutstandingActivitiesListing_FreeTextSearch", "");
            //                //                SetCookie("OutstandingActivitiesListing_TxtConditionOne", "");
            //                //                SetCookie("OutstandingActivitiesListing_TxtConditionTwo", "");
            //                //                SetCookie("OutstandingActivitiesListing_TxtConditionThree", "");
            //                //                SetCookie("OutstandingActivitiesListing_rdoAnd", "");
            //                //                SetCookie("OutstandingActivitiesListing_rdoOr", "");
            //                var path = Context.Request.ApplicationPath + "/";
            //                SetCookie("OutstandingActivitiesListting_Common", "", -1000, path);
            //            }
        }
        function OpenActivitiesListingHandover() {
            //update by gordon 20150827 U167.6 | Duty SC Book On is no longer used
            //            var strURL = "../Popup/popupActivitiesListingHandover.aspx?Shift=" + document.getElementById("hdnShift").value;
            var strURL = "../Popup/popupActivitiesListingHandover.aspx";
            var ReturnValue = window.showModalDialog(strURL, "", "DialogWidth:705px;DialogHeight:670px;help:no;status:no");
            if (ReturnValue == 1) {
                //                window.location.reload(true);
                // edit by dylan 20150930 for 167
                location.href = location.href;
            }
        }

        function ChangeFreeTextSearchStatus(obj) {
            if (document.all['rdoAnd'].checked == true) {
                document.all['rdoAnd'].checked = "checked"
            }
            else {
                document.all['rdoOr'].checked = "checked"
            }

            if (obj.checked == true) {
                document.all['TxtConditionOne'].disabled = '';
                document.all['TxtConditionTwo'].disabled = '';
                document.all['TxtConditionThree'].disabled = '';
                document.getElementById("rdoAnd").disabled = false;
                document.getElementById("rdoOr").disabled = false;
                document.all['TxtConditionOne'].focus();

            }
            else {
                document.all['TxtConditionOne'].disabled = 'disabled';
                document.all['TxtConditionTwo'].disabled = 'disabled';
                document.all['TxtConditionThree'].disabled = 'disabled';
                document.getElementById("rdoAnd").disabled = true;
                document.getElementById("rdoOr").disabled = true;
            }
        }
        function ChangeEstimatedCompletion(obj) {
            var objTime = document.getElementById("dtbEstimatedCompletion");
            if (obj.checked == true) {
                document.getElementById("dtbEstimatedCompletion").style.display = "inline-block";
            }
            else {
                document.getElementById("dtbEstimatedCompletion").style.display = "none";
            }
        }
        function HTML_ChangeHightLight(value) {
            var btnChangeHightLight = document.getElementById("btnChangeHightLight");
            var hdnValue = document.getElementById("hdnValue");
            hdnValue.value = value;
            btnChangeHightLight.click();
        }
        function HTMLChangeToComplete(value)  //huangyao 20081129 in MTR office
        {
            /*******************add by jack 20151202 for using session store enquiry condition satrt**********************/
            //            //window.open(value);  //NL original method
            //            /*Comment by jack 20151013 for u239*/
            //            //            newwin = window.open("", "", "scrollbars=yes, toolbar=yes, menubar=yes, location=yes, status=yes,resizable=yes");
            //            //            if (document.all) {
            //            //                newwin.moveTo(0, 0);
            //            //                newwin.resizeTo(screen.width, screen.height - 25);
            //            //            }
            //            //            newwin.location = value;
            //            //update by benson 2015-10-16 U239.1 start
            //            var station = document.getElementById("ddlStation").value;
            //            var dateFrom;
            //            var dateTo;
            //            var showlist = "";
            //            var inputAll = document.getElementsByTagName("input");
            //            for (var i = 0; i < inputAll.length; i++) {
            //                if (inputAll[i].type == "text" && inputAll[i].id.indexOf("dtbFromDate") >= 0) {
            //                    dateFrom = inputAll[i].value;
            //                }
            //                if (inputAll[i].type == "text" && inputAll[i].id.indexOf("dtbToDate") >= 0) {
            //                    dateTo = inputAll[i].value;
            //                }
            //            }
            //            var lalValue = document.getElementById("chklShow").getElementsByTagName("label");
            //            var showlist = getChackboxListValue("chklShow");

            //            var WordCategoryList = "";
            //            var lalValueCategory = document.getElementById("cblWordCategory").getElementsByTagName("label");
            //            var WordCategoryList = getChackboxListValue("cblWordCategory");

            //            var chkSearch = document.getElementById("chkSearch").checked;
            //            var FreeTextSearch = document.getElementById("chkFreeTextSearch").checked;

            //            var TxtConditionOne = document.getElementById("TextOne").value;
            //            var TxtConditionTwo = document.getElementById("TextTwo").value;
            //            var TxtConditionThree = document.getElementById("TextThree").value;
            //            //added by Nathan 2015-08-15

            //            var rdoAnd = document.getElementById("rdoAnd").checked;
            //            var rdoOr = document.getElementById("rdoOr").checked;

            //            var cbxReturnItemOs = document.getElementById("cbxReturnItemOs").checked;

            // 
            //            if (FreeTextSearch == true) {
            //                //SetCookie("OutstandingActivitiesListing_FreeTextSearch", "1");
            //                FreeTextSearch = "1";
            //            } else {
            //                //SetCookie("OutstandingActivitiesListing_FreeTextSearch", "0");
            //                FreeTextSearch = "0";
            //            }

            //            //            SetCookie("OutstandingActivitiesListing_station", station);
            //            //            SetCookie("OutstandingActivitiesListing_dateFrom", dateFrom);
            //            //            SetCookie("OutstandingActivitiesListing_dateTo", dateTo);
            //            //            SetCookie("OutstandingActivitiesListing_showlist", showlist);
            //            //            SetCookie("OutstandingActivitiesListing_workCategory", WordCategoryList);
            //            //            SetCookie("OutstandingActivitiesListing_chkSearch", chkSearch);
            //            //            SetCookie("OutstandingActivitiesListing_TxtConditionOne", TxtConditionOne);
            //            //            SetCookie("OutstandingActivitiesListing_TxtConditionTwo", TxtConditionTwo);
            //            //            SetCookie("OutstandingActivitiesListing_TxtConditionThree", TxtConditionThree);
            //            //            SetCookie("OutstandingActivitiesListing_rdoAnd", rdoAnd);
            //            //            SetCookie("OutstandingActivitiesListing_rdoOr", rdoOr);
            //            //            SetCookie("OutstandingActivitiesListing_cbxReturnItemOs", cbxReturnItemOs);

            //            var CookieValue = '{ "Station":"' + station + '", "DateFrom":"' + dateFrom + '", "DateTo":"' + dateTo + '", "List":"' + showlist + '", "WorkCategory":"' + WordCategoryList + '", "chkSearch":"' + chkSearch + '", "FreeTextSearch":"' + FreeTextSearch + '","ConditionOne":"' + TxtConditionOne + '", "ConditionTwo":"' + TxtConditionTwo + '", "ConditionThree":"' + TxtConditionThree + '", "Rand":"' + rdoAnd + '", "Ror":"' + rdoOr + '", "cbxReturnItemOs":"' + cbxReturnItemOs + '"}';
            //            var pathName = window.document.location.pathname;
            //            var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
            //            SetCookie("OutstandingActivitiesListting_Common", CookieValue, "", projectName + "/");
            //            window.location.href = value + "&isBack=1";
            //update by benson 2015-10-16 U239.1 end
            // edit by jack 20151208 for session save
            document.getElementById("<%=HiddenFieldUrl.ClientID %>").value = value;
            document.getElementById("<%=btnSetSession.ClientID %>").click();
            /*******************add by jack 20151202 for using session store enquiry condition end**********************/
        }
        ///add by benson 2015-06-30 The pop-up window  begin
        function windowOpen(url) {
            /************edit by jack 20151130 for cookie save start***************************/
            document.getElementById("<%=HiddenFieldUrl.ClientID %>").value = url;
            document.getElementById("<%=btnSetSession.ClientID %>").click();
            //            var station = document.getElementById("ddlStation").value;
            //            var dateFrom;
            //            var dateTo;
            //            var showlist = "";
            //            var inputAll = document.getElementsByTagName("input");
            //            for (var i = 0; i < inputAll.length; i++) {
            //                if (inputAll[i].type == "text" && inputAll[i].id.indexOf("dtbFromDate") >= 0) {
            //                    dateFrom = inputAll[i].value;
            //                }
            //                if (inputAll[i].type == "text" && inputAll[i].id.indexOf("dtbToDate") >= 0) {
            //                    dateTo = inputAll[i].value;
            //                }
            //            }
            //            var lalValue = document.getElementById("chklShow").getElementsByTagName("label");
            //            //            var chkList = document.getElementById("chklShow").getElementsByTagName("input");
            //            //            for (var i = 0; i < chkList.length; i++) {
            //            //                if (chkList[i].checked == true) {
            //            //                    var chkID = chkList[i].id;
            //            //                    for (var j = 0; j < lalValue.length; j++) {
            //            //                        var forvalue = lalValue[j].getAttributeNode("for").value;
            //            //                        if (chkID == forvalue) {
            //            //                            if (showlist == "") {
            //            //                                showlist = lalValue[j].innerHTML
            //            //                            } else {
            //            //                                showlist = showlist + "," + lalValue[j].innerHTML;
            //            //                            }
            //            //                        }
            //            //                    }
            //            //                }
            //            //            }
            //            var showlist = getChackboxListValue("chklShow");

            //            var WordCategoryList = "";
            //            var lalValueCategory = document.getElementById("cblWordCategory").getElementsByTagName("label");
            //            //            var chkListCategory = document.getElementById("cblWordCategory").getElementsByTagName("input");
            //            //            for (var i = 0; i < chkListCategory.length; i++) {
            //            //                if (chkListCategory[i].checked == true) {
            //            //                    var chkID = chkListCategory[i].id;
            //            //                    for (var j = 0; j < lalValueCategory.length; j++) {
            //            //                        var forvalue = lalValueCategory[j].getAttributeNode("for").value;
            //            //                        if (chkID == forvalue) {
            //            //                            if (WordCategoryList == "") {
            //            //                                WordCategoryList = lalValueCategory[j].innerHTML
            //            //                            } else {
            //            //                                WordCategoryList = WordCategoryList + "," + lalValueCategory[j].innerHTML;
            //            //                            }
            //            //                        }
            //            //                    }
            //            //                }
            //            //            }
            //            var WordCategoryList = getChackboxListValue("cblWordCategory");

            //            var chkSearch = document.getElementById("chkSearch").checked;
            //            var FreeTextSearch = document.getElementById("chkFreeTextSearch").checked;

            //            //added by Nathan 2015-08-15
            //            //            var TxtConditionOne = document.getElementById("TxtConditionOne").value;
            //            //            var TxtConditionTwo = document.getElementById("TxtConditionTwo").value;
            //            //            var TxtConditionThree = document.getElementById("TxtConditionThree").value;
            //            var TxtConditionOne = document.getElementById("TextOne").value;
            //            var TxtConditionTwo = document.getElementById("TextTwo").value;
            //            var TxtConditionThree = document.getElementById("TextThree").value;
            //            //added by Nathan 2015-08-15

            //            var rdoAnd = document.getElementById("rdoAnd").checked;
            //            var rdoOr = document.getElementById("rdoOr").checked;

            //            var cbxReturnItemOs = document.getElementById("cbxReturnItemOs").checked;

            //         
            //            //            SetCookie("OutstandingActivitiesListing_station", station);
            //            //            SetCookie("OutstandingActivitiesListing_dateFrom", dateFrom);
            //            //            SetCookie("OutstandingActivitiesListing_dateTo", dateTo);
            //            //            SetCookie("OutstandingActivitiesListing_showlist", showlist);
            //            //            SetCookie("OutstandingActivitiesListing_workCategory", WordCategoryList);
            //            //            SetCookie("OutstandingActivitiesListing_chkSearch", chkSearch);
            //            //            SetCookie("OutstandingActivitiesListing_TxtConditionOne", TxtConditionOne);
            //            //            SetCookie("OutstandingActivitiesListing_TxtConditionTwo", TxtConditionTwo);
            //            //            SetCookie("OutstandingActivitiesListing_TxtConditionThree", TxtConditionThree);
            //            //            SetCookie("OutstandingActivitiesListing_rdoAnd", rdoAnd);
            //            //            SetCookie("OutstandingActivitiesListing_rdoOr", rdoOr);
            //            //            SetCookie("OutstandingActivitiesListing_cbxReturnItemOs", cbxReturnItemOs);

            //            if (FreeTextSearch == true) {
            //                //SetCookie("OutstandingActivitiesListing_FreeTextSearch", "1");
            //                FreeTextSearch = "1";
            //            } else {
            //                //SetCookie("OutstandingActivitiesListing_FreeTextSearch", "0");
            //                FreeTextSearch = "0";
            //            }

            //            var CookieValue = '{ "Station":"' + station + '", "DateFrom":"' + dateFrom + '", "DateTo":"' + dateTo + '", "List":"' + showlist + '", "WorkCategory":"' + WordCategoryList + '", "chkSearch":"' + chkSearch + '", "FreeTextSearch":"' + FreeTextSearch + '","ConditionOne":"' + TxtConditionOne + '", "ConditionTwo":"' + TxtConditionTwo + '", "ConditionThree":"' + TxtConditionThree + '", "Rand":"' + rdoAnd + '", "Ror":"' + rdoOr + '", "cbxReturnItemOs":"' + cbxReturnItemOs + '"}';
            //            var pathName = window.document.location.pathname;
            //            var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
            //            SetCookie("OutstandingActivitiesListting_Common", CookieValue, "", projectName + "/");
            //            window.location.href = (url + "&isBack=1");
            /************edit by jack 20151130 for cookie save end***************************/
        }
        ///add by benson 2015-06-30 The pop-up window  end
    </script>
</head>
<body>
    <%--onload="PageOnload();"--%>
    <form id="form1" runat="server">
    <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
    </AjaxControlToolkit:ToolkitScriptManager>
    <!-------add by jack 20151202 for using session store enquiry condition start----->
    <asp:HiddenField ID="HiddenFieldUrl" runat="server" />
    <asp:HiddenField ID="HiddenFieldIsBack" runat="server" Value="" />
    <asp:Button ID="btnSetSession" runat="server" Text="SetSession" OnClick="btnSetSession_Click"
        Style="display: none" />
    <!-------add by jack 20151202 for using session store enquiry condition end----->
    <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
        <tr>
            <td colspan="2" class="Page_Head">
                <WebStructure:PageHead ID="PageHead" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="Page_Left">
                <WebStructure:MainMenu ID="MainMenu" runat="server" AppPath="../../" CurrMenuID="M1405" />
            </td>
            <td class="Page_Right" style="width: 100%">
                <table class="Page_Contents">
                    <tr>
                        <td class="TabStrip">
                            <WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140501" ParentMenuID="M1405" DMenuMode="CurrOnly"
                                runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Contents">
                            <fieldset style="clear: both; margin-bottom: 5px; background-color: green; color: White;
                                border: 0">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr>
                                        <%--            remove by dylan 20150826 for u167
                                        <td>
                                            <asp:Label ID="lblStationStatus" runat="server"></asp:Label>
                                        </td>

                                        <td>
                                            <asp:Label ID="lblCurrentShift" runat="server"></asp:Label>
                                          </td>--%>
                                        <td>
                                            <%--<asp:Label ID="lblTotalWorkGoup" runat="server"></asp:Label>--%>
                                            <asp:UpdatePanel ID="updWGV" runat="server">
                                                <ContentTemplate>
                                                    <asp:Label ID="lblTotalWorkGoup" runat="server"></asp:Label>
                                                    <asp:Label ID="lblTotalWorkGoupValue" runat="server" Font-Bold="true"></asp:Label>
                                                    &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
                                                    <asp:Label ID="lblDataTime" runat="server"></asp:Label>
                                                    <asp:Label ID="lblDataTimeValue" runat="server" Font-Bold="true"></asp:Label>
                                                </ContentTemplate>
                                                <Triggers>
                                                    <asp:AsyncPostBackTrigger ControlID="btnRefresh" />
                                                    <asp:AsyncPostBackTrigger ControlID="TimerRefresh" />
                                                </Triggers>
                                            </asp:UpdatePanel>
                                            <%-- <asp:Label ID="lblTotalWorkGoupValue" runat="server" Font-Bold="true"></asp:Label>--%>
                                            <%--&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 
                                            <asp:Label ID="lblDataTime" runat="server"></asp:Label>
                                            <asp:Label ID="lblDataTimeValue" runat="server" Font-Bold="true"></asp:Label>--%>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                        <%--  <td>    remove by dylan 20150826 for u167
                                            <asp:Label ID="lblHandoverStatus" runat="server"></asp:Label>
                                        </td>--%>
                                        <td align="right">
                                            <input type="button" id="btnHandoverCheck" runat="server" onclick="OpenActivitiesListingHandover(); return true;" />
                                            <input type="button" id="btnStationStatus" runat="server" visible="false" />
                                            <asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" />
                                        </td>
                                    </tr>
                                    <%--     remove by dylan 20150826 for u167    <tr>
                                                     <td>
                                            <asp:Label ID="lblStationStatusValue" runat="server" Font-Bold="true"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblCurStatusValue" runat="server" Font-Bold="true"></asp:Label>
                                        </td>
                                             <td>
                                            <asp:Label ID="lblHandoverStatusValue" runat="server" Font-Bold="true"></asp:Label>
                                        </td>
                                        <td>
                                
                                        </td>
                                        <%--huangyao 20081126 <td>
                                                <asp:Literal ID="lblTotalWorker" Runat="server" ></asp:Literal>&nbsp;&nbsp;
			                                    <asp:Literal ID="lblTotalWorkerValue" Runat="server" ></asp:Literal>
                                            </td>
                                    </tr>--%>
                                </table>
                            </fieldset>
                            <fieldset style="clear: both; margin-bottom: 5px; background-color: #eeeeee;">
                                <table cellpadding="0" cellspacing="0" width="100%">
                                    <tr>
                                        <td nowrap>
                                            <asp:Label ID="lblStation" runat="server"></asp:Label>
                                            <asp:DropDownList ID="ddlStation" runat="server" CssClass="ddlStation">
                                            </asp:DropDownList>
                                        </td>
                                        <td nowrap>
                                            <asp:Label ID="lblFrom" runat="server"></asp:Label>
                                            <APJ:DateTextBox ID="dtbFromDate" runat="server"></APJ:DateTextBox>
                                            <asp:Label ID="lblTo" runat="server"></asp:Label>
                                            <APJ:DateTextBox ID="dtbToDate" runat="server"></APJ:DateTextBox>
                                        </td>
                                        <td valign="middle">
                                            <asp:Label ID="lblShow" runat="server"></asp:Label>
                                        </td>
                                        <td valign="middle">
                                            <asp:CheckBoxList ID="chklShow" runat="server" RepeatColumns="4" RepeatDirection="horizontal"
                                                CssClass="tableborder" TextAlign="Right">
                                            </asp:CheckBoxList>
                                        </td>
                                        <td align="right">
                                            <asp:Panel runat="server" ID="palEstimatedCompletion">
                                                <input type="checkbox" runat="server" id="chkEstimatedCompletion" onclick="ChangeEstimatedCompletion(this)" />
                                                <asp:Label ID="lblEstimatedCompletion" runat="server"></asp:Label>
                                                <APJ:DateTextBox ID="dtbEstimatedCompletion" runat="server" HasTime="true"></APJ:DateTextBox>
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            <table width="100%">
                                                <tr>
                                                    <td style="width: 90px" nowrap="nowrap">
                                                        <asp:Literal ID="lblWordCategory" runat="server"></asp:Literal>
                                                    </td>
                                                    <td colspan="4" style="width: 60%">
                                                        <asp:CheckBoxList ID="cblWordCategory" runat="server" RepeatDirection="Horizontal"
                                                            CssClass="tableborder" TextAlign="Right">
                                                        </asp:CheckBoxList>
                                                    </td>
                                                    <td align="center">
                                                        &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:CheckBox ID="cbxReturnItemOs" runat="server" Text="Returned Item in O/S event" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <div>
                                                <asp:UpdatePanel ID="updFreeText" runat="server">
                                                    <ContentTemplate>
                                                        <span style="float: left">
                                                            <asp:CheckBox ID="chkFreeTextSearch" runat="server" AutoPostBack="true" OnCheckedChanged="chkFreeTextSearch_CheckedChanged" /><%--onclick="ChangeFreeTextSearchStatus(this);" --%>
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <%-- add by gordon 20160112 - for Update full text index label (veritically center textboxes) U296 --%>
                                                            </span><span style="float: left; margin-top:7px">
                                                            <%--added by Nathan 2015-08-15--%>
                                                            <asp:TextBox ID="TextOne" runat="server" Style="display: none;"></asp:TextBox>
                                                            <asp:TextBox ID="TxtConditionOne" runat="server" Width="100px" MaxLength="50" Enabled="False"></asp:TextBox>
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <%--added by Nathan 2015-08-15--%>
                                                            <asp:TextBox ID="TextTwo" runat="server" Style="display: none;"></asp:TextBox>
                                                            <asp:TextBox ID="TxtConditionTwo" runat="server" Width="100px" Enabled="False" MaxLength="50"></asp:TextBox>
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <%--added by Nathan 2015-08-15--%>
                                                            <asp:TextBox ID="TextThree" runat="server" Style="display: none;"></asp:TextBox>
                                                            <asp:TextBox ID="TxtConditionThree" runat="server" Width="100px" Enabled="False"
                                                                MaxLength="50"></asp:TextBox>
                                                            &nbsp;&nbsp;
                                                            <asp:TextBox ID="TextRadio" runat="server" Style="display: none;"></asp:TextBox>
                                                            <asp:RadioButton ID="rdoAnd" runat="server" GroupName="nexusgroup" />
                                                            &nbsp;&nbsp;
                                                            <asp:RadioButton ID="rdoOr" runat="server" GroupName="nexusgroup" />
                                                        </span>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </td>
                                        <td>
                                            <span style="float: right">
                                                <asp:CheckBox ID="chkSearch" runat="server" OnCheckedChanged="chkSearch_CheckedChanged"
                                                    TextAlign="Right" AutoPostBack="true" />
                                                &nbsp;&nbsp;&nbsp;&nbsp;
                                                <%-- update by gordon 20150812 | For Search Wait Cursor --%>
                                                <%--<input type="button" id="btnSearch" runat="server" />--%>
                                                <input type="button" id="btnSearch" onclick="showWait('../../CSS/ForAdmRegWaitCursor.css');"
                                                    runat="server" />
                                                <%--
                                                update by gordon 20150910
                                                <input type="button" id="btnExporttoExcel" runat="server" />--%>
                                                <input type="button" id="btnExporttoExcel" onclick="return ExportClick('../../CSS/ForAdmRegWaitCursor.css',this.id);"
                                                    runat="server" />
                                                <%-- added by Nathan 2015-08-15--%>
                                                <asp:Button ID="BFSearc" runat="server" Text="" OnClick="BFSearc_ServerClick" Style="display: none;" />&nbsp;&nbsp;
                                            </span>
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                            <fieldset style="clear: both; margin-bottom: 5px; background-color: #eeeeee;">
                                <table cellspacing="0" cellpadding="0" style="width: 100%;">
                                    <tr valign="middle">
                                        <%-- remove by dylan 20150826 for u167  
                                        /// Before icon to click on the link But now do not have this function
                                        /// So don't need this function button
                                          <td>
                                            <input type="button" id="btnChangeToNormal" runat="server" />
                                        </td>--%>
                                        <td style="width: 2%;">
                                        </td>
                                        <td class="" style="width: 20%;">
                                            <asp:Label ID="lblAdmissionRegistry" runat="server"></asp:Label><asp:Label ID="lblAdmissionRegistryValue"
                                                runat="server"></asp:Label>
                                        </td>
                                        <td class="" style="width: 20%;">
                                            <asp:Label ID="lblAssetLoanSectionName" runat="server"></asp:Label><asp:Label ID="lblAssetLoanSectionNameValue"
                                                runat="server"></asp:Label>
                                        </td>
                                        <td class="" style="width: 20%;">
                                            <asp:Label ID="lblFireProtection" runat="server"></asp:Label><asp:Label ID="lblFireProtectionValue"
                                                runat="server"></asp:Label>
                                        </td>
                                        <td class="" style="width: 20%;">
                                            <asp:Label ID="lblGenEvent" runat="server"></asp:Label><asp:Label ID="lblGenEventValue"
                                                runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                            <asp:UpdatePanel runat="server" ID="panelGrid" UpdateMode="Conditional">
                                <%--
                            update by gordon 20151008 U192
                            <asp:UpdatePanel runat="server" ID="panelGrid" UpdateMode="Conditional" >--%>
                                <ContentTemplate>
                                    <%-- update by gordon 20150721 U138 | Delete KeyName [EventRemindTime] --%>
                                    <APJ:CommonGridView ID="grdActivitiesListing" runat="server" DataKeyNames="StationEventID,EventNo,EventTime,EventTypeID,EventType,EventStatusID,ParentStationEventID,ParentEventStatus,ParentEventStatusID,ParentEventNo,EstimatedWrkHour,HighLight,Description,FlagHandover,HandoverNote,StaffName,DepartmentCompany,Tel,EventNoOfWorkers,JobLocation,TNNo,JobProtection,ECSStatus1,ECSStatus2,ECSStatus3,FireSystem,FireLinkStatus,IsolatedGrp,WorkCategory,WorkSubCategory"
                                        AllowPaging="True" AutoGenerateColumns="False" BorderColor="black" CssClass="GridView"
                                        AllowSorting="True" OnRowDataBound="grdActivitiesListing_RowDataBound" AscPic="~/Images/Common/arrow_up_green.png"
                                        DescPic="~/Images/Common/arrow_down_green.png" PageLinkCount="7">
                                        <Columns>
                                            <asp:BoundField DataField="HighLight" SortExpression="HighLight">
                                                <ItemStyle VerticalAlign="Top" Width="16px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="EventStatusID" HeaderText="SOM_Completed" SortExpression="EventStatusID"
                                                Visible="False">
                                                <ItemStyle VerticalAlign="Top" Width="16px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="EventStatusID" SortExpression="EventStatusID" Visible="False">
                                                <ItemStyle VerticalAlign="Top" Width="16px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="FlagHandover" SortExpression="FlagHandover">
                                                <ItemStyle VerticalAlign="Top" Width="16px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="EventTime" HeaderText="SOM_DateTime" SortExpression="EventTime">
                                                <ItemStyle VerticalAlign="Top" Width="10px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="EventType" HeaderText="SOM_EventCategoryDescription" SortExpression="EventType">
                                                <ItemStyle VerticalAlign="Top" Width="100%" />
                                            </asp:BoundField>
                                        </Columns>
                                        <RowStyle CssClass="GridView_Row"></RowStyle>
                                        <HeaderStyle CssClass="GridView_Header"></HeaderStyle>
                                        <AlternatingRowStyle CssClass="GridView_AlternativeRow"></AlternatingRowStyle>
                                        <EmptyDataRowStyle CssClass="GridView_Header" />
                                        <PagerTemplate>
                                            <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                                <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                        <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                        <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                        &nbsp; &nbsp;
                                                        <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                        &nbsp;<asp:Label ID="Label1" runat="server">/</asp:Label>
                                                        &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                                    </asp:TableCell>
                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                        <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                        &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                            <asp:ListItem Value="5">5</asp:ListItem>
                                                            <asp:ListItem Value="10">10</asp:ListItem>
                                                            <asp:ListItem Value="15">15</asp:ListItem>
                                                            <asp:ListItem Value="20">20</asp:ListItem>
                                                            <asp:ListItem Value="25">25</asp:ListItem>
                                                            <asp:ListItem Value="30">30</asp:ListItem>
                                                        </asp:DropDownList>
                                                    </asp:TableCell>
                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                        <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                                    </asp:TableCell>
                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                        <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                        </asp:Panel>
                                                    </asp:TableCell>
                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                        <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                                    </asp:TableCell>
                                                </asp:TableRow>
                                            </asp:Table>
                                        </PagerTemplate>
                                        <EmptyDataTemplate>
                                            <asp:Table ID="Table1" runat="server" CssClass="GridView_Header_EmptyData">
                                                <asp:TableRow ID="TableRow1" runat="server">
                                                    <asp:TableCell ID="TableCell1" runat="server" Style="border-right: black 1px solid;" Width="16px"></asp:TableCell>
                                                    <asp:TableCell ID="TableCell2" runat="server" Style="border-right: black 1px solid;" Width="16px"></asp:TableCell>
                                                    <asp:TableCell ID="TableCell3" runat="server" Style="border-right: black 1px solid;" Width="10px"></asp:TableCell>
                                                    <asp:TableCell ID="TableCell4" runat="server" Width="100%"></asp:TableCell>
                                                </asp:TableRow>
                                            </asp:Table>
                                        </EmptyDataTemplate>
                                    </APJ:CommonGridView>
                                    <input type="button" id="btnChangeHightLight" runat="server" onserverclick="ChangeHightLight"
                                        style="visibility: hidden" />
                                </ContentTemplate>
                                <%-- update by gordon 20151008 U192 --%>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="btnSearch" />
                                    <asp:AsyncPostBackTrigger ControlID="TimerRefresh" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                    <tr>
                        <td class="Page_Foot" style="height: 54px">
                            <WebStructure:PageFoot ID="PageFoot" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <input type="hidden" runat="server" id="hdnShift" value="0" />
    <input type="hidden" runat="server" id="hdnCacheDataReturnInt" value="0" />
    <input type="hidden" runat="server" id="hdnCancelHightLight" />
    <asp:HiddenField ID="hdnValue" runat="server" />
    <asp:UpdatePanel ID="updAuto" runat="server">
        <ContentTemplate>
            <asp:Timer ID="TimerRefresh" runat="server" OnTick="TimerRefresh_Tick">
            </asp:Timer>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="chkSearch" />
        </Triggers>
    </asp:UpdatePanel>
    </form>
</body>
<script type="text/javascript">
    PageOnload();
</script>
</html>
